package com.android.svmc.app.mobile.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;

import android.widget.EditText;

public class Validate {
	
	public static boolean validateUsername(EditText username){
		String temp = username.getText().toString();
		if(temp.length() != 0){
			return true;
		}else {
			return false;
		}

	}
	public static int validatePassword (EditText password , EditText confirmPassword){
		String pass1 = password.getText().toString();
		String pass2 = confirmPassword.getText().toString();
		if ( pass1.length() < 6){
			return CommonDefine.PASSWORD_LENGHT_FAIL;
		}
		if (pass1.equals(pass2) == false){
			return CommonDefine.CONFIRM_PASSWORD_FAIL;
		}
		return CommonDefine.CONFIRM_PASSWORD_SUCCESS;
	}
	public static boolean validateBirthday (String date){
		Calendar c = Calendar.getInstance();
		SimpleDateFormat sdf = new SimpleDateFormat("dd-mm-yyyy");
		
		
		return false;
	}

}
